home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 570 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. From: David Byrden <100101.2547@compuserve.com>
  2. Message-ID: <4gvdu0$ccf@news.bridge.net>
  3. X-Original-Date: 27 Feb 1996 17:10:24 GMT
  4. Path: in1.uu.net!bounce-back
  5. Date: 28 Feb 96 00:17:30 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++
  8. Subject: Re: Is this legal?
  9. Organization: self-employed
  10. References: <rice-2602962041230001@luna.tiac.net>
  11. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMTOfJ+EDnX0m9pzZAQESHQF/XOez64jz1VVbXPnz6rEI+Dx2Cd2G10ar
  14.     twcLaTgvewJzIa/gAd6ujPByJiz10auk
  15.     =OSeO
  16.  
  17. >>>>>>>
  18. void main(void)
  19. {
  20.     T<int>* pA = nil;
  21.     dynamic_cast < T<int>* > (pA);
  22. }
  23.  
  24. Our compiler reports this error:
  25. Error   : illegal use of incomplete struct/union/class
  26. x.cp line 12   dynamic_cast < T<int>* > (pA);
  27. <<<<<<<<<<
  28.  
  29.  
  30.   Your compiler is not in agreement with the January 1996 draft standard, 
  31. and I quote;
  32.  
  33.  
  34.  
  35. 5.2.6.3  If the type of [the pointer] is the same as the required result 
  36. type........the result is v (converted if necessary).
  37.  
  38.  
  39.                                         David
  40. ---
  41. [ To submit articles: try just posting with your news-reader.
  42.                       If that fails, use mailto:std-c++@ncar.ucar.edu
  43.   FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  44.   Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  45.   Comments? mailto:std-c++-request@ncar.ucar.edu.
  46. ]
  47.